package com.ruoyi.service.dict.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.service.dict.entity.DictTypeEntity;
import com.ruoyi.service.dict.mapper.DictTypeMapper;
import com.ruoyi.service.dict.service.DictTypeService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 字典类型表 服务实现类
 * </p>
 *
 * @author zhanglianbao
 * @since 2025-10-04
 */
@Service
public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictTypeEntity>
    implements DictTypeService {

  @Override
  public DictTypeEntity getByTypeCode(String dictType) {
    return getOne(effectQuery().eq(DictTypeEntity::getDictType, dictType));
  }

  private LambdaQueryWrapper<DictTypeEntity> effectQuery() {
    return new LambdaQueryWrapper<DictTypeEntity>();
  }
}
